package com.itheima.define;

import java.util.Arrays;

public class ArrayDemo5 {
    public static void main(String[] args) {
        //动态初始化数组
        int[] arr = new int[5];
        System.out.println(arr);
        //给数组赋值
        for (int i = 0; i < arr.length; i++) {
            arr[i] = i + 1;
        }
        System.out.println("---------");

        char[] chars = new char[5];
        System.out.println((int) chars[0]);
        System.out.println((int)chars[1]);

        System.out.println("---------");

        double[] scores = new double[5];
        System.out.println(scores[0]);
        System.out.println(scores[1]);

        System.out.println("---------");

        boolean[] flags = new boolean[5];
        System.out.println(flags[0]);
        System.out.println(flags[1]);

        System.out.println("---------");

        String[] names = new String[5];
        System.out.println(names[0]);
        System.out.println(names[1]);


    }
}
